﻿@using BlazorApp.Pages.Pod.Volume
@using BlazorApp.Pages.Common.Metadata
@inherits BlazorApp.Pages.Common.PageBase

@if (PodSpec.Volumes != null)
{
    <Divider Orientation="left" Style="font-weight:bold">
        @L["Volumes"]<span style="color:#DCDCDC">(@PodSpec.Volumes.Count)</span>
    </Divider>

    @for (var i = 0; i < PodSpec.Volumes.Count; i++)
    {
        var v     = PodSpec.Volumes[i];
        var index = i + 1;

        <HostPathView Volume="@v" Index="@index"></HostPathView>
        <ProjectedView Volume="@v" Index="@index" Namespace="@Namespace"></ProjectedView>
        <ConfigMapView Volume="@v" Index="@index" Namespace="@Namespace"></ConfigMapView>
        <EmptyDirView Volume="@v" Index="@index"></EmptyDirView>
        <SecretView Volume="@v" Index="@index" Namespace="@Namespace"></SecretView>
        <NfsView Volume="@v" Index="@index"></NfsView>
        <PvcView Volume="@v" Index="@index" Namespace="@Namespace"></PvcView>
        <IscsiView Volume="@v" Index="@index"></IscsiView>
        <FcView Volume="@v" Index="@index"></FcView>
        <CsiView Volume="@v" Index="@index"></CsiView>
        <PropertySimpleView Title=@L["EphemeralVolumes"] Item="@v.Ephemeral" ExplainField="volume.ephemeral" ShowInJson="true"></PropertySimpleView>
    }
}
